import React from 'react';
import { useHistory } from 'react-router-dom'

import {
    Container,
    Main
} from './StyleList'

const aaa = [
    { id: 1, name: '一年级1班' },
    { id: 2, name: '一年级2班' },
    { id: 3, name: '一年级3班' },
    { id: 4, name: '二年级1班' },
    { id: 5, name: '二年级2班' },
    { id: 6, name: '二年级3班' },
]

const tabar ={
    index1: 1,
    index2: 0
}

const List = () => {
    let history = useHistory()   
    return (
        <Container>
            <div className="notice">
                <ul onClick={() => { history.push('/historyNotice',tabar.index1) }}>
                    <i>通知历史</i>
                    <span>&gt;</span>
                </ul>
                <ul onClick={() => { history.push('/historyNotice',tabar.index2)}}>
                    <i>发布通知</i>
                    <span>&gt;</span>
                </ul>
            </div>
            <Main
                width="1px"
                color="#666"
                className="main">
                <select>
                    {
                        aaa.map((v) => {
                        return <option key={v.id}>{v.name}</option>
                        })
                    }
                </select>
                <ul>
                    <li>班级管理</li>
                    <li>课堂奖励</li>
                    <li>邀请家长</li>
                </ul>
            </Main>
        </Container>
    );
}


export default List;